LINUX_SRC = /home/liaojq/imx6ull/bsp/kernel/linux-imx
CROSS_COMPILE=/opt/buildroot/cortexA7/bin/arm-linux-
INST_PATH=/test_driver
PWD := $(shell pwd)
EXTRA_CFLAGS+=-DMODULE
obj-m += led_dri_2.o
modules:
	@make -C $(LINUX_SRC) M=$(PWD) modules
	@make clear
uninstall:
	rm -f ${INST_PATH}/*.ko
install: uninstall
	cp -af *.ko ${INST_PATH}
clear:
	@rm -f *.o *.cmd *.mod.c
	@rm -rf *~ core .depend .tmp_versions Module.symvers modules.order -f
	@rm -f .*ko.cmd .*.o.cmd .*.o.d
clean: clear
	@rm -f *.ko

